package com.yuba.front.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yuba.common.excel.annotation.ExcelDictFormat;
import com.yuba.common.excel.convert.ExcelDictConvert;
import com.yuba.common.translation.annotation.Translation;
import com.yuba.common.translation.constant.TransConstant;
import com.yuba.front.domain.FrontMessage;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 用户消息通知视图对象 front_message
 *
 * @author modakai
 * @date 2024-12-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = FrontMessage.class)
public class FrontMessageVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 通知ID
     */
    @ExcelProperty(value = "通知ID")
    private Long messageId;

    /**
     * 接收通知的用户
     */
    @ExcelProperty(value = "接收通知的用户")
    private Long userId;

    private String username;

    /**
     * 发送通知的用户
     */
    @ExcelProperty(value = "发送通知的用户")
    private Long senderId;

    private String senderUsername;

    @Translation(type = TransConstant.OSS_ID_TO_URL)
    private Long senderAvatar;

    /**
     * 通知类型
     */
    @ExcelProperty(value = "通知类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "message_type")
    private String type;

    /**
     * 消息来源ID，例如帖子ID或评论ID
     */
    @ExcelProperty(value = "消息来源ID，例如帖子ID或评论ID")
    private Long sourceId;

    /**
     * 消息跳转时的参数
     */
    @ExcelProperty(value = "消息跳转时的参数")
    @Translation(type = TransConstant.MESSAGE_META)
    private String meta;

    /**
     * 通知内容
     */
    @ExcelProperty(value = "通知内容")
    private String value;

    /**
     * 是否已读
     */
    @ExcelProperty(value = "是否已读", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private String readFlag;

    private Boolean likeCommentFlag;

    private Date createTime;


}
